Graph Type

  • Step 1:

    Line chart or line graph

    
                  <record id="view_stock_level_forecast_graph" model="ir.ui.view">
    
    <field name="name">Stock.forecast.graph</field>
    
    <field name="model">report.stock.forecast</field>
    
    <field name="arch" type="xml">
    
        <graph string="Stock Level forecast" type="line">
    
            <field name="product_id" type="col"/>
    
            <field name="cumulative_quantity" type="measure"/>
    
        </graph>
    
    </field>
    
    </record>
    
    

    Bar chart

    
    <record id="view_project_task_graph" model="ir.ui.view">
    
    <field name="name">project.task.graph</field>
    
    <field name="model">project.task</field>
    
    <field name="arch" type="xml">
    
        <graph string="Project Tasks" type="bar" stacked="True">
    
            <field name="project_id" type="row"/>
    
            <field name="planned_hours" type="measure"/>
    
        </graph>
    
    </field>
    

    Pie chart

    
    <record model="ir.ui.view" id="view_stock_quant_graph_value">
    
    <field name="name">stock.quant.graph</field>
    
    <field name="model">stock.quant</field>
    
    <field eval="12" name="priority"/>
    
    <field name="arch" type="xml">
    
        <graph string="Inventory Valuation" type="pie">
    
            <field name="product_id" type="row"/>
    
            <field name="qty" type="measure"/>
    
            <field name="inventory_value" type="measure"/>
    
        </graph>
    
    </field>
    
    </record>